#ifndef __TMenuItem_H__
#define __TMenuItem_H__


#include "THandleComponent.h"


class PACKAGE TMenuItem : public THandleComponent
{
    typedef THandleComponent inherited;
    
__published:
    __property WideString Caption = {read = FCaption, write = SetCaption, stored = IsCaptionStored};
    
    __property Classes::TNotifyEvent OnClick = {read = FOnClick, write = FOnClick, stored = IsOnClickStored};
    __property Classes::TNotifyEvent OnHighlighted = {read = FOnHighlighted, write = FOnHighlighted};
    __property Classes::TNotifyEvent OnShow = {read = FOnShow, write = FOnShow};
    
public:
    __fastcall TMenuItem (TComponent * AOwner);
    
    virtual void __fastcall Click ();
    
protected:
    DYNAMIC void __fastcall SetParentComponent (TComponent* Value);
    
    DYNAMIC void __fastcall Show ();
    
private:
    WideString FCaption;
    
    TNotifyEvent FOnClick;
    TNotifyEvent FOnHighlighted;
    TNotifyEvent FOnShow;
    
    bool __fastcall IsCaptionStored ();
    
    bool __fastcall IsOnClickStored ();
    
    void __fastcall SetCaption (const WideString Value);
};


#endif /* __TMenuItem_H__ */
